home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
awe2-0_1.lha
/
awe2-0.1
/
Src
/
RCS
/
Histogram.h,v
< prev
next >
Wrap
Text File
|
1989-05-04
|
2KB
|
136 lines
head 3.3;
branch ;
access ;
symbols ;
locks grunwald:3.3; strict;
comment @ * @;
3.3
date 89.05.04.14.59.39; author grunwald; state Exp;
branches ;
next 3.2;
3.2
date 89.02.20.15.35.03; author grunwald; state Exp;
branches ;
next 3.1;
3.1
date 88.12.20.13.49.57; author grunwald; state Exp;
branches ;
next 1.2;
1.2
date 88.10.30.13.05.50; author grunwald; state Exp;
branches ;
next 1.1;
1.1
date 88.09.18.16.42.09; author grunwald; state Exp;
branches ;
next ;
desc
@@
3.3
log
@Before switching to Libg++ version
@
text
@// This may look like C code, but it is really -*- C++ -*-
//
// Copyright (C) 1988 University of Illinois, Urbana, Illinois
//
// written by Dirk Grunwald (grunwald@@cs.uiuc.edu)
//
#ifndef HISTOGRAMH
#define HISTOGRAMH
#pragma once
#include <Statistic.h>
#include <assert.h>
extern const int HistogramMinimum;
extern const int HistogramMaximum;
class Histogram : public Statistic {
short howManyBuckets;
int *bucketCount;
double *bucketLimit;
public:
Histogram(double low, double hi, double bucketWidth = -1.0);
~Histogram();
virtual void reset();
virtual void operator+=(double);
int similarSamples(double);
inline int buckets() { return(howManyBuckets); };
inline double bucketThreshold(int i) {
assert2(i >= 0 && i < howManyBuckets,
"[Histogram::inBucket] Illegal bucket access");
return(bucketLimit[i]);
}
inline int inBucket(int i) {
assert2(i >= 0 && i < howManyBuckets,
"[Histogram::inBucket] Illegal bucket access");
return(bucketCount[i]);
}
void printBuckets(ostream&);
virtual void classPrintOn(ostream&);
};
#endif HISTOGRAMH
@
3.2
log
@Start using Gnu library heaps for schedulers
@
text
@d9 1
d11 2
a12 2
#include "Statistic.h"
#include "assert.h"
@
3.1
log
@Steay version
@
text
@@
1.2
log
@*** empty log message ***
@
text
@@
1.1
log
@Initial revision
@
text
@d1 6
@